package cn.wolfcode.car.business.web.controller;

import cn.wolfcode.car.business.domain.Appointment;
import cn.wolfcode.car.business.service.IAppointmentService;
import cn.wolfcode.car.common.web.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class AppointController {
    @Autowired
    private IAppointmentService appointmentService;

    @RequestMapping("/appoint")
    @ResponseBody
    public AjaxResult appoint(@RequestBody Appointment appointment){
        appointmentService.saveAppoint(appointment);
        return AjaxResult.success();
    }
}
